import EnumStrVO from '@/model/EnumStrVO'

export default class FlexLayout {
    static readonly none = null
    static readonly start = 'start'
    static readonly center = 'center'
    static readonly end = 'end'
    static readonly between = 'between'
    static readonly around = 'around'

    private static readonly noneEnum: EnumStrVO = new EnumStrVO(FlexLayout.none, '不使用')
    private static readonly startEnum: EnumStrVO = new EnumStrVO(FlexLayout.start, 'start（起点对齐）')
    private static readonly centerEnum: EnumStrVO = new EnumStrVO(FlexLayout.center, 'center（居中对齐）')
    private static readonly endEnum: EnumStrVO = new EnumStrVO(FlexLayout.end, 'end（终点对齐）')
    private static readonly betweenEnum: EnumStrVO = new EnumStrVO(FlexLayout.between, 'between（两端对齐）')
    private static readonly aroundEnum: EnumStrVO = new EnumStrVO(FlexLayout.around, 'around（间隔相等）')

    static readonly enums: EnumStrVO[] = []
    static readonly enum_map: Map<number, string> = new Map<number, string>()
}

for (const key in FlexLayout) {
  if (FlexLayout[key] instanceof EnumStrVO) {
    FlexLayout.enums.push(FlexLayout[key])
    FlexLayout.enum_map.set(FlexLayout[key].value, FlexLayout[key].name)
  }
}
